/**
 * <p>
 * 表格配置
 *
 * @Author：Roy
 * @Description：预警
 * @Date：Create by 2023-12-04 14:51:04
 */

const headerConfig = {
  'warning-manage': [
    {
      prop: 'warningName',
      name: '预警名称',
      minWidth: 110
    },
    {
      prop: 'createTm',
      name: '预警时间',
      minWidth: 110
    },
    {
      prop: 'projectName',
      name: '所属项目',
      minWidth: 110
    },
    {
      prop: 'sceneInfoName',
      name: '所属场景',
      minWidth: 110
    },
    {
      prop: 'meterDeviceName',
      name: '关联设备',
      minWidth: 110
    },
    {
      prop: 'energyTypeName',
      name: '能源类型',
      minWidth: 110
    },
    {
      prop: 'meterConditionName',
      name: '计量条件',
      minWidth: 110
    },
    {
      prop: 'endTime',
      name: '预警阈值(kgCO2)',
      minWidth: 150,
      formatter: (row, item) => {
        let str = row.judgeRuleName + row.thresholdValue
        return str
      }
    },
    {
      prop: 'meterValue',
      name: '预警值',
      minWidth: 110
    },
    {
      prop: 'thresholdUnit',
      name: '阈值数值单位',
      minWidth: 120
    },
    {
      prop: 'thresholdLevelName',
      name: '预警级别',
      minWidth: 130
    },
    {
      prop: 'statusName',
      name: '信息状态',
      minWidth: 110
    },
    {
      name: '操作',
      width: 200,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '详情',
          id: 'warning-manage-look',
          authId: 'ecp-admin:warningManage:search',
          config: { type: 'text' },
          style: { color: 'rgb(219,139,57)' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        },
        {
          type: 'btnText',
          label: '删除',
          id: 'warning-manage-delete',
          authId: 'ecp-admin:warningManage:deleteById',
          isMore: true,
          config: { type: 'text' },
          style: { color: '#ff0000' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        }
      ]
    }
  ]
}

export default {}
export { headerConfig }
